package com.mlegrand.firestarter.business
{
	import com.adobe.cairngorm.business.ServiceLocator;
	import mx.rpc.AsyncToken;
	import mx.rpc.IResponder;
	import mx.rpc.remoting.RemoteObject;
	
	public class SampleLoginDelegate
	{
		protected var responder:IResponder;
		
		public function SampleLoginDelegate(resp:IResponder)
		{
			responder = resp;
		}
		
		/**
		 * Sample delegate showing login. 
		 * 
		 * @param		userName			String
		 *				password			String 
		 */ 
		public function verifyCredentials(userName:String, password:String):void
		{
			var ro:RemoteObject = ServiceLocator.getInstance().getRemoteObject("sampleLoginService");
			var t:AsyncToken = ro.verifyCredentials(userName, password);
			t.addResponder(responder);
		}
	}
}